package com.umakr.ax.common.mapper;

import com.baomidou.mybatisplus.plugins.Page;
import com.umakr.ax.common.model.Spread;
import com.umakr.ax.common.vo.SpreadActivityVO;
import com.umakr.ax.core.base.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * Mapper接口
 * </p>
 *
 * @author Umakr-Code-Generator
 * @since 2017-12-30
 */
public interface SpreadMapper extends BaseMapper<Spread> {

    Page<Map<String,Object>> listSpreadByType(@Param("rsId") Long rsId, @Param("spreadType") Integer spreadType);
    Page<Map<String,Object>> listSpreadForShake(@Param("rsId") Long rsId, @Param("spreadType") Integer spreadType, @Param("searchText")String searchText);

    void delSpread(@Param("id") Long id,@Param("delStatus")  Integer delStatus);

    Integer saveSpread(Spread spread);

    Integer updateSpread(Spread spread);

    Map<String,Object> getSpreadInfoById(@Param("id")Long spreadId);

    List<SpreadActivityVO> findSpreadByResCode(@Param("resCodes")String resCodes, @Param("currentDateTime")String currentDateTime);
}